package com.xymtop.Service;

import com.xymtop.Server.Util.DBService;
import com.xymtop.Vo.CourseVo;

import java.util.List;

/**
 * @ClassName : CourseService
 * @Description : 课程操作
 * @Author : 肖叶茂
 * @Date: 2022/12/13  23:30
 */
public class CourseService {
   public List<Object> getList(String major) throws ClassNotFoundException, InstantiationException, IllegalAccessException {

        List<Object> objectList = DBService.Get("SELECT * FROM `javaweb`.`courseview` where majorid = "+major,CourseVo.class.getCanonicalName());
        if(objectList.isEmpty()){
            return  null;
        }else {
            return objectList;
        }

    }
}
